Skip to content

Remove auto-execution on Flash in the event of a 429/Quota failover - #3662

Merged
bdmorgan merged 9 commits into
mainfrom
issue-2711
Jul 9, 2025
Merged

Remove auto-execution on Flash in the event of a 429/Quota failover#3662
bdmorgan merged 9 commits into
mainfrom
issue-2711

Conversation

@bdmorgan

@bdmorgan bdmorgan commented Jul 9, 2025

Copy link
Copy Markdown
Collaborator

User Experience Now

Before Fix:

  • Pro model hits quota → Flash model immediately executes → User confused

After Fix:

  • Pro model hits quota → User sees clear error message → User must manually submit new query to continue with Flash

📋 User Workflow

  1. User submits query with Pro model
  2. Pro model hits quota limit
  3. ✅ Error message displayed: "You have reached your daily gemini-2.5-pro quota limit"
  4. ✅ Model switched for future use (Flash)
  5. ✅ Current execution stopped - Flash model not called
  6. ✅ User prompted to submit new query to continue
  7. User submits new query → Flash model executes normally

The solution respects quota limits, gives users full control, and prevents unwanted Flash execution exactly as requested!

Resolves #2711

@bdmorgan
bdmorgan requested a review from a team as a code owner July 9, 2025 15:43

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @bdmorgan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a user experience issue where hitting a quota limit on a 'Pro' model would automatically trigger a fallback to the 'Flash' model and attempt to continue the current query, causing confusion. The changes introduce more granular error detection for quota limits, provide clearer user messages, and, crucially, prevent the automatic continuation of queries with the Flash model after a quota-induced fallback, requiring explicit user action to proceed.

Highlights

  • Prevented Automatic Flash Execution: When a 'Pro' model (e.g., gemini-2.5-pro) hits a quota limit, the system now explicitly stops the current execution and requires the user to initiate a new query for the 'Flash' model. Previously, it would automatically attempt to continue the current query with the Flash model, leading to user confusion.
  • Granular Quota Error Detection: Introduced new utility functions (isProQuotaExceededError, isGenericQuotaExceededError) to differentiate between various 429 (Too Many Requests) errors, specifically identifying Pro model quota limits versus general rate limits or other quota issues.
  • Enhanced User Feedback: Updated API error parsing to provide more specific and actionable messages to users when quota limits are reached. Messages now include details about the specific model that hit the quota, and guidance on upgrading or switching authentication methods, tailored to the user's current tier (Free, Standard, Legacy).
  • Controlled Model Fallback Logic: Modified the flashFallbackHandler and retryWithBackoff mechanisms to pass detailed error information. The handler can now explicitly prevent immediate retry/continuation of the current query after a quota-based model switch, giving the user control.
  • State Management for Quota Errors: Added new state variables and config flags (modelSwitchedFromQuotaError, quotaErrorOccurred) to track when a model switch occurs due to a quota error. This ensures that subsequent Flash model calls are blocked until a new user query is explicitly submitted, and these flags are reset upon a new query.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request is a significant improvement to the user experience when handling API quota limits. I appreciate the clear description of the new workflow and the thoroughness of the changes, including the new error detection logic and extensive tests.

I've found one area with a logical issue that I've detailed below. Addressing this will make the implementation more robust and easier to maintain.

Once again, great work on this feature. I'm looking forward to seeing these changes merged.

Comment thread packages/core/src/core/geminiChat.ts
Comment thread packages/core/src/core/geminiChat.ts
@gemini-cli gemini-cli Bot added kind/bug priority/p0 Critical and urgent (e.g., critical security vulnerability, major breakage). labels Jul 9, 2025
@bdmorgan bdmorgan removed the kind/bug label Jul 9, 2025
@github-actions

github-actions Bot commented Jul 9, 2025

Copy link
Copy Markdown

Code Coverage Summary

Package Lines Statements Functions Branches
CLI 71.85% 71.85% 73.87% 77.42%
Core 72.59% 72.59% 75.14% 80.12%
CLI Package - Full Text Report
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-------------------|---------|----------|---------|---------|-------------------
All files          |   71.85 |    77.42 |   73.87 |   71.85 |                   
 src               |   41.11 |    58.06 |    37.5 |   41.11 |                   
  gemini.tsx       |   15.61 |       20 |   16.66 |   15.61 | ...92-230,235-307 
  ...ractiveCli.ts |   90.24 |    65.38 |     100 |   90.24 | ...28,131,154-155 
 src/config        |   85.83 |    76.62 |   83.33 |   85.83 |                   
  auth.ts          |     100 |      100 |     100 |     100 |                   
  config.ts        |   95.74 |    79.48 |    62.5 |   95.74 | ...58-259,329-333 
  extension.ts     |   81.66 |    84.37 |     100 |   81.66 | ...00-104,113-114 
  sandboxConfig.ts |   51.35 |    16.66 |   66.66 |   51.35 | ...43,53-69,74-91 
  settings.ts      |   85.13 |    77.58 |    92.3 |   85.13 | ...92-293,329-330 
 src/generated     |     100 |      100 |     100 |     100 |                   
  git-commit.ts    |     100 |      100 |     100 |     100 |                   
 src/services      |     100 |      100 |     100 |     100 |                   
  ...andService.ts |     100 |      100 |     100 |     100 |                   
 src/test-utils    |     100 |      100 |     100 |     100 |                   
  ...andContext.ts |     100 |      100 |     100 |     100 |                   
 src/ui            |   57.98 |    55.26 |   68.18 |   57.98 |                   
  App.tsx          |   55.35 |     45.9 |    62.5 |   55.35 | ...34-846,852-881 
  colors.ts        |   86.04 |      100 |   76.92 |   86.04 | 12-13,18-19,42-43 
  constants.ts     |       0 |        0 |       0 |       0 | 1-15              
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/ui/commands   |   99.13 |    94.73 |   83.33 |   99.13 |                   
  clearCommand.ts  |     100 |      100 |     100 |     100 |                   
  helpCommand.ts   |     100 |      100 |     100 |     100 |                   
  memoryCommand.ts |     100 |      100 |     100 |     100 |                   
  types.ts         |       0 |        0 |       0 |       0 | 1                 
 src/ui/components |   71.13 |     71.8 |   64.28 |   71.13 |                   
  AboutBox.tsx     |     100 |       50 |     100 |     100 | 102               
  AsciiArt.ts      |     100 |      100 |     100 |     100 |                   
  AuthDialog.tsx   |   86.91 |    93.75 |      50 |   86.91 | 39-44,66-73       
  ...nProgress.tsx |   15.78 |      100 |       0 |   15.78 | 17-57             
  ...Indicator.tsx |   15.15 |      100 |       0 |   15.15 | 17-47             
  ...lePatcher.tsx |   73.17 |      100 |   66.66 |   73.17 | 34-46             
  ...ryDisplay.tsx |   21.05 |      100 |       0 |   21.05 | 17-35             
  ...ryDisplay.tsx |   97.82 |    95.83 |     100 |   97.82 | 59                
  ...esDisplay.tsx |   10.52 |      100 |       0 |   10.52 | 24-82             
  ...ngsDialog.tsx |    6.76 |      100 |       0 |    6.76 | 26-168            
  Footer.tsx       |   71.42 |    11.11 |     100 |   71.42 | ...,90-97,100-103 
  ...ngSpinner.tsx |      80 |    33.33 |     100 |      80 | 29,31-32          
  Header.tsx       |   96.87 |       60 |     100 |   96.87 | 27                
  Help.tsx         |    3.73 |      100 |       0 |    3.73 | 17-154            
  ...emDisplay.tsx |   68.65 |    57.14 |     100 |   68.65 | ...55-60,79-86,89 
  InputPrompt.tsx  |   79.52 |     62.5 |     100 |   79.52 | ...19,362,389-393 
  ...Indicator.tsx |     100 |      100 |     100 |     100 |                   
  ...geDisplay.tsx |   25.92 |      100 |       0 |   25.92 | 14-36             
  ...tsDisplay.tsx |     100 |      100 |     100 |     100 |                   
  ...ryDisplay.tsx |     100 |      100 |     100 |     100 |                   
  ...Indicator.tsx |   44.44 |      100 |       0 |   44.44 | 12-17             
  ...MoreLines.tsx |      60 |       25 |     100 |      60 | 24-27,33-40       
  StatsDisplay.tsx |   98.39 |    86.66 |     100 |   98.39 | 173-175           
  ...nsDisplay.tsx |   83.05 |    61.53 |     100 |   83.05 | 34-39,42-43,87-89 
  ThemeDialog.tsx  |    82.7 |       20 |      25 |    82.7 | ...,95-99,197-208 
  Tips.tsx         |      16 |      100 |       0 |      16 | 17-45             
  ...tsDisplay.tsx |     100 |     87.5 |     100 |     100 | 30-31             
  ...ification.tsx |   36.36 |      100 |       0 |   36.36 | 15-22             
 ...nents/messages |   62.67 |     80.9 |   57.89 |   62.67 |                   
  ...onMessage.tsx |   18.51 |      100 |       0 |   18.51 | 22-49             
  DiffRenderer.tsx |   96.31 |    82.66 |     100 |   96.31 | ...01-202,206,271 
  ErrorMessage.tsx |   22.22 |      100 |       0 |   22.22 | 16-31             
  ...niMessage.tsx |   18.51 |      100 |       0 |   18.51 | 20-43             
  ...geContent.tsx |   19.04 |      100 |       0 |   19.04 | 25-43             
  InfoMessage.tsx  |     100 |      100 |     100 |     100 |                   
  ...onMessage.tsx |   38.91 |     62.5 |   33.33 |   38.91 | ...32-164,200-225 
  ...upMessage.tsx |     9.3 |      100 |       0 |     9.3 | 26-123            
  ToolMessage.tsx  |   87.76 |       80 |     100 |   87.76 | ...,91-95,169-171 
  UserMessage.tsx  |     100 |      100 |     100 |     100 |                   
  ...llMessage.tsx |   36.36 |      100 |       0 |   36.36 | 17-25             
 ...ponents/shared |    74.7 |    71.87 |   85.18 |    74.7 |                   
  MaxSizedBox.tsx  |   78.51 |    79.24 |   88.88 |   78.51 | ...36-438,537-538 
  ...tonSelect.tsx |   88.05 |    92.85 |      60 |   88.05 | ...,68-71,108-109 
  text-buffer.ts   |   72.44 |    67.24 |    92.3 |   72.44 | ...1235-1238,1243 
 src/ui/contexts   |    92.8 |    86.36 |     100 |    92.8 |                   
  ...owContext.tsx |   91.07 |    81.81 |     100 |   91.07 | 46-47,59-61       
  ...onContext.tsx |     100 |      100 |     100 |     100 |                   
  ...ngContext.tsx |   71.42 |       50 |     100 |   71.42 | 17-20             
 src/ui/editors    |   93.87 |    85.71 |   66.66 |   93.87 |                   
  ...ngsManager.ts |   93.87 |    85.71 |   66.66 |   93.87 | 53,67-68          
 src/ui/hooks      |   71.08 |    80.69 |   64.86 |   71.08 |                   
  ...dProcessor.ts |   82.07 |    82.75 |     100 |   82.07 | ...92-395,406-422 
  ...dProcessor.ts |      82 |    74.35 |      80 |      82 | ...15-324,328-329 
  ...dProcessor.ts |   66.07 |    77.12 |   43.47 |   66.07 | ...1227-1232,1235 
  ...uthCommand.ts |    7.14 |      100 |       0 |    7.14 | 17-76             
  ...tIndicator.ts |     100 |      100 |     100 |     100 |                   
  ...ketedPaste.ts |     100 |      100 |     100 |     100 |                   
  useCompletion.ts |   68.62 |    86.17 |      80 |   68.62 | ...14-420,485-488 
  ...leMessages.ts |   96.96 |    88.88 |     100 |   96.96 | 25-26             
  ...orSettings.ts |     100 |      100 |     100 |     100 |                   
  ...miniStream.ts |   67.57 |    70.49 |     100 |   67.57 | ...83-684,710-800 
  ...BranchName.ts |   91.66 |    84.61 |     100 |   91.66 | 57-63             
  ...oryManager.ts |   98.41 |    93.33 |     100 |   98.41 | 43                
  ...putHistory.ts |    92.5 |    85.71 |     100 |    92.5 | 62-63,71,93-95    
  useKeypress.ts   |    60.6 |       50 |     100 |    60.6 | ...1,75-76,92-101 
  ...gIndicator.ts |     100 |      100 |     100 |     100 |                   
  useLogger.ts     |      25 |      100 |       0 |      25 | 14-32             
  ...raseCycler.ts |    95.5 |       75 |     100 |    95.5 | ...66-167,185-187 
  ...cySettings.ts |     4.5 |      100 |       0 |     4.5 | 19-135            
  ...lScheduler.ts |   79.01 |    94.87 |     100 |   79.01 | ...00-203,293-303 
  ...oryCommand.ts |       0 |        0 |       0 |       0 | 1-7               
  ...ellHistory.ts |   91.95 |    79.16 |   83.33 |   91.95 | 28-30,41-42,87-88 
  ...oryCommand.ts |       0 |        0 |       0 |       0 | 1-75              
  ...tateAndRef.ts |   95.45 |    66.66 |     100 |   95.45 | 25                
  ...rminalSize.ts |   77.27 |      100 |      50 |   77.27 | 19-23             
  ...emeCommand.ts |   64.28 |     87.5 |     100 |   64.28 | ...,92-93,100-106 
  useTimer.ts      |   88.09 |    85.71 |     100 |   88.09 | 44-45,51-53       
 src/ui/privacy    |   13.77 |      100 |       0 |   13.77 |                   
  ...acyNotice.tsx |    9.58 |      100 |       0 |    9.58 | 20-113            
  ...acyNotice.tsx |    12.9 |      100 |       0 |    12.9 | 15-55             
  ...acyNotice.tsx |   10.81 |      100 |       0 |   10.81 | 15-58             
  ...acyNotice.tsx |   30.76 |      100 |       0 |   30.76 | 19-36,39-41       
 src/ui/themes     |   99.42 |    89.47 |     100 |   99.42 |                   
  ansi-light.ts    |     100 |      100 |     100 |     100 |                   
  ansi.ts          |     100 |      100 |     100 |     100 |                   
  atom-one-dark.ts |     100 |      100 |     100 |     100 |                   
  ayu-light.ts     |     100 |      100 |     100 |     100 |                   
  ayu.ts           |     100 |      100 |     100 |     100 |                   
  default-light.ts |     100 |      100 |     100 |     100 |                   
  default.ts       |     100 |      100 |     100 |     100 |                   
  dracula.ts       |     100 |      100 |     100 |     100 |                   
  github-dark.ts   |     100 |      100 |     100 |     100 |                   
  github-light.ts  |     100 |      100 |     100 |     100 |                   
  googlecode.ts    |     100 |      100 |     100 |     100 |                   
  no-color.ts      |     100 |      100 |     100 |     100 |                   
  ...-of-purple.ts |     100 |      100 |     100 |     100 |                   
  theme-manager.ts |   89.77 |    84.21 |     100 |   89.77 | 66,98-103,108-109 
  theme.ts         |   98.44 |    94.73 |     100 |   98.44 | 304-307           
  xcode.ts         |     100 |      100 |     100 |     100 |                   
 src/ui/utils      |   79.43 |    83.88 |    97.5 |   79.43 |                   
  ...Colorizer.tsx |    80.5 |     87.5 |     100 |    80.5 | 88-89,159-183     
  ...nRenderer.tsx |   57.57 |    45.45 |     100 |   57.57 | ...21-129,131-133 
  ...wnDisplay.tsx |   64.24 |    71.69 |      75 |   64.24 | ...94-322,354-378 
  ...eRenderer.tsx |     100 |    96.29 |     100 |     100 | 121               
  commandUtils.ts  |     100 |      100 |     100 |     100 |                   
  computeStats.ts  |     100 |      100 |     100 |     100 |                   
  displayUtils.ts  |     100 |      100 |     100 |     100 |                   
  errorParsing.ts  |     100 |     92.5 |     100 |     100 | 74,78,84          
  formatters.ts    |   90.47 |    95.83 |     100 |   90.47 | 57-60             
  ...nUtilities.ts |   69.84 |    85.71 |     100 |   69.84 | 75-91,100-101     
  textUtils.ts     |   93.93 |    92.85 |     100 |   93.93 | 14-15             
  updateCheck.ts   |     100 |      100 |     100 |     100 |                   
 src/utils         |    8.78 |    77.77 |    62.5 |    8.78 |                   
  cleanup.ts       |   91.66 |       50 |     100 |   91.66 | 18                
  package.ts       |   88.88 |    85.71 |     100 |   88.88 | 33-34             
  readStdin.ts     |    3.44 |      100 |       0 |    3.44 | 7-39              
  sandbox.ts       |       0 |        0 |       0 |       0 | 1-871             
  ...upWarnings.ts |   23.07 |      100 |       0 |   23.07 | 14-40             
  ...upWarnings.ts |     100 |      100 |     100 |     100 |                   
  version.ts       |     100 |       50 |     100 |     100 | 11                
-------------------|---------|----------|---------|---------|-------------------
Core Package - Full Text Report
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-------------------|---------|----------|---------|---------|-------------------
All files          |   72.59 |    80.12 |   75.14 |   72.59 |                   
 src               |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
 src/__mocks__/fs  |     100 |      100 |     100 |     100 |                   
  promises.ts      |     100 |      100 |     100 |     100 |                   
 src/code_assist   |   69.08 |    75.49 |    72.5 |   69.08 |                   
  codeAssist.ts    |      25 |      100 |       0 |      25 | 12-27             
  converter.ts     |   89.06 |    96.15 |   81.81 |   89.06 | 176-180,199-209   
  oauth2.ts        |   79.91 |    65.95 |   83.33 |   79.91 | ...10-312,322-324 
  server.ts        |   40.44 |       80 |   53.84 |   40.44 | ...76-254,257-259 
  setup.ts         |   72.41 |     62.5 |     100 |   72.41 | 52-53,64-66,75-85 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/config        |   67.36 |    90.16 |   54.38 |   67.36 |                   
  config.ts        |   67.02 |    90.16 |   54.38 |   67.02 | ...79-484,501-551 
  models.ts        |     100 |      100 |     100 |     100 |                   
 src/core          |   74.51 |     75.3 |   80.43 |   74.51 |                   
  client.ts        |    73.3 |     75.6 |   86.95 |    73.3 | ...15,617-618,621 
  ...tGenerator.ts |   91.56 |    81.81 |     100 |   91.56 | 73-74,123,134-137 
  ...lScheduler.ts |   72.07 |    69.33 |   81.25 |   72.07 | ...51-657,674-683 
  geminiChat.ts    |   62.83 |    71.79 |   64.28 |   62.83 | ...98,613,617-625 
  geminiRequest.ts |     100 |      100 |     100 |     100 |                   
  logger.ts        |   82.71 |    78.26 |     100 |   82.71 | ...72-276,285-286 
  modelCheck.ts    |   76.74 |       25 |     100 |   76.74 | 26-27,56-60,64-67 
  ...olExecutor.ts |     100 |    66.66 |     100 |     100 | 63,93             
  prompts.ts       |   81.05 |    68.18 |      50 |   81.05 | ...60-265,281-338 
  tokenLimits.ts   |      15 |      100 |       0 |      15 | 15-31             
  turn.ts          |   80.67 |    82.14 |     100 |   80.67 | ...13-216,229-230 
 src/services      |   77.71 |    86.11 |   70.58 |   77.71 |                   
  ...eryService.ts |   77.33 |       75 |   85.71 |   77.33 | ...1-62,84,91-103 
  gitService.ts    |   78.02 |      100 |      60 |   78.02 | ...10-114,117-121 
 src/telemetry     |   81.31 |    86.77 |   86.04 |   81.31 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  loggers.ts       |   82.94 |       85 |    87.5 |   82.94 | 160-199           
  metrics.ts       |   60.36 |    95.65 |    62.5 |   60.36 | ...36-158,161-184 
  sdk.ts           |   82.85 |    28.57 |     100 |   82.85 | ...18,126-127,133 
  types.ts         |   82.51 |     97.5 |   84.61 |   82.51 | 83-92,149-172     
  uiTelemetry.ts   |   99.18 |    95.65 |     100 |   99.18 | 119               
 ...learcut-logger |   80.75 |    80.64 |   70.58 |   80.75 |                   
  ...cut-logger.ts |   80.51 |       80 |      75 |   80.51 | ...02-414,417-419 
  ...tadata-key.ts |    82.6 |      100 |       0 |    82.6 | 143-153           
 src/tools         |   63.73 |     80.9 |   69.17 |   63.73 |                   
  diffOptions.ts   |     100 |      100 |     100 |     100 |                   
  edit.ts          |   77.65 |    81.94 |   83.33 |   77.65 | ...49-450,454-489 
  glob.ts          |   86.79 |       80 |   85.71 |   86.79 | ...89-290,298-305 
  grep.ts          |   56.37 |     75.8 |   72.72 |   56.37 | ...27-532,537-541 
  ls.ts            |    9.28 |      100 |    12.5 |    9.28 | ...85-190,198-308 
  mcp-client.ts    |   75.38 |    77.96 |      30 |   75.38 | ...64-365,384-385 
  mcp-tool.ts      |   91.75 |    85.71 |     100 |   91.75 | ...36,142,147-148 
  memoryTool.ts    |   97.45 |    84.84 |     100 |   97.45 | 94,96,98-99       
  ...iable-tool.ts |     100 |    84.61 |     100 |     100 | 90,97             
  read-file.ts     |   98.36 |    96.15 |     100 |   98.36 | 120-121           
  ...many-files.ts |   80.82 |    70.45 |      80 |   80.82 | ...39-440,447-448 
  shell.ts         |    31.8 |      100 |   54.54 |    31.8 | ...53-275,278-492 
  tool-registry.ts |   58.24 |    73.46 |   78.57 |   58.24 | ...99-304,310-311 
  tools.ts         |   76.31 |      100 |      40 |   76.31 | ...44-145,154-159 
  web-fetch.ts     |   30.23 |    72.22 |   66.66 |   30.23 | ...85-186,214-352 
  web-search.ts    |   12.17 |      100 |      20 |   12.17 | ...03-104,107-196 
  write-file.ts    |   81.25 |    82.35 |      80 |   81.25 | ...19-324,386-416 
 src/utils         |   79.65 |    80.75 |   87.03 |   79.65 |                   
  LruCache.ts      |   70.96 |     62.5 |     100 |   70.96 | 20-22,28,30-34    
  bfsFileSearch.ts |   92.45 |    86.66 |     100 |   92.45 | 53-54,67-68       
  editCorrector.ts |   77.35 |    61.11 |   91.66 |   77.35 | ...70-682,716,730 
  editor.ts        |   97.33 |    93.75 |     100 |   97.33 | 134,196,199-200   
  ...rReporting.ts |   83.52 |    84.61 |     100 |   83.52 | 81-85,106-114     
  errors.ts        |   41.46 |       60 |      75 |   41.46 | 17-21,37-52,56-62 
  fetch.ts         |   34.04 |      100 |       0 |   34.04 | 22-27,31-57       
  fileUtils.ts     |   94.69 |    91.54 |     100 |   94.69 | ...45-249,318-324 
  ...eUtilities.ts |   96.03 |       96 |     100 |   96.03 | 28-29,57-58       
  ...rStructure.ts |      95 |    93.42 |     100 |      95 | ...66-167,344-346 
  ...noreParser.ts |   96.36 |     91.3 |     100 |   96.36 | 70-71             
  gitUtils.ts      |   46.34 |    66.66 |      50 |   46.34 | 24-25,40-41,50-73 
  ...yDiscovery.ts |    80.7 |    75.43 |      75 |    80.7 | ...12-313,316-317 
  ...tProcessor.ts |   86.86 |    88.46 |     100 |   86.86 | 115-124,131-140   
  ...Inspectors.ts |     100 |      100 |     100 |     100 |                   
  ...kerChecker.ts |   83.14 |    82.35 |     100 |   83.14 | ...,94-99,107-113 
  paths.ts         |   62.79 |    73.33 |   57.14 |   62.79 | ...23-133,139-140 
  ...rDetection.ts |   40.78 |    36.36 |      80 |   40.78 | ...11-112,118-123 
  retry.ts         |   62.55 |    73.21 |     100 |   62.55 | ...54-274,319-334 
  ...aValidator.ts |   86.66 |    73.33 |     100 |   86.66 | 22-23,25-26,43-44 
  session.ts       |     100 |      100 |     100 |     100 |                   
  testUtils.ts     |   84.44 |    72.72 |   83.33 |   84.44 | 27-28,34-35,70-72 
  user_id.ts       |   63.63 |    33.33 |      80 |   63.63 | ...57,74-75,78-79 
-------------------|---------|----------|---------|---------|-------------------

For detailed HTML reports, please see the 'coverage-reports-22.x' artifact from the main CI run.

@github-actions

github-actions Bot commented Jul 9, 2025

Copy link
Copy Markdown

Code Coverage Summary

Package Lines Statements Functions Branches
CLI N/A% N/A% N/A% N/A%
Core 72.87% 72.87% 75.34% 80.25%
CLI Package - Full Text Report
CLI full-text-summary.txt not found at: coverage_artifact/cli/coverage/full-text-summary.txt
Core Package - Full Text Report
-------------------|---------|----------|---------|---------|-------------------
File               | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
-------------------|---------|----------|---------|---------|-------------------
All files          |   72.87 |    80.25 |   75.34 |   72.87 |                   
 src               |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
 src/__mocks__/fs  |     100 |      100 |     100 |     100 |                   
  promises.ts      |     100 |      100 |     100 |     100 |                   
 src/code_assist   |    71.7 |    75.49 |    72.5 |    71.7 |                   
  codeAssist.ts    |      25 |      100 |       0 |      25 | 12-27             
  converter.ts     |   89.06 |    96.15 |   81.81 |   89.06 | 176-180,199-209   
  oauth2.ts        |   79.91 |    65.95 |   83.33 |   79.91 | ...10-312,322-324 
  server.ts        |    46.4 |       80 |   53.84 |    46.4 | ...60-201,204-206 
  setup.ts         |   72.41 |     62.5 |     100 |   72.41 | 52-53,64-66,75-85 
  types.ts         |     100 |      100 |     100 |     100 |                   
 src/config        |   67.36 |    90.16 |   54.38 |   67.36 |                   
  config.ts        |   67.02 |    90.16 |   54.38 |   67.02 | ...79-484,501-551 
  models.ts        |     100 |      100 |     100 |     100 |                   
 src/core          |   74.51 |     75.3 |   80.43 |   74.51 |                   
  client.ts        |    73.3 |     75.6 |   86.95 |    73.3 | ...15,617-618,621 
  ...tGenerator.ts |   91.56 |    81.81 |     100 |   91.56 | 73-74,123,134-137 
  ...lScheduler.ts |   72.07 |    69.33 |   81.25 |   72.07 | ...51-657,674-683 
  geminiChat.ts    |   62.83 |    71.79 |   64.28 |   62.83 | ...98,613,617-625 
  geminiRequest.ts |     100 |      100 |     100 |     100 |                   
  logger.ts        |   82.71 |    78.26 |     100 |   82.71 | ...72-276,285-286 
  modelCheck.ts    |   76.74 |       25 |     100 |   76.74 | 26-27,56-60,64-67 
  ...olExecutor.ts |     100 |    66.66 |     100 |     100 | 63,93             
  prompts.ts       |   81.05 |    68.18 |      50 |   81.05 | ...60-265,281-338 
  tokenLimits.ts   |      15 |      100 |       0 |      15 | 15-31             
  turn.ts          |   80.67 |    82.14 |     100 |   80.67 | ...13-216,229-230 
 src/services      |   77.71 |    86.11 |   70.58 |   77.71 |                   
  ...eryService.ts |   77.33 |       75 |   85.71 |   77.33 | ...1-62,84,91-103 
  gitService.ts    |   78.02 |      100 |      60 |   78.02 | ...10-114,117-121 
 src/telemetry     |   81.31 |    86.77 |   86.04 |   81.31 |                   
  constants.ts     |     100 |      100 |     100 |     100 |                   
  index.ts         |     100 |      100 |     100 |     100 |                   
  loggers.ts       |   82.94 |       85 |    87.5 |   82.94 | 160-199           
  metrics.ts       |   60.36 |    95.65 |    62.5 |   60.36 | ...36-158,161-184 
  sdk.ts           |   82.85 |    28.57 |     100 |   82.85 | ...18,126-127,133 
  types.ts         |   82.51 |     97.5 |   84.61 |   82.51 | 83-92,149-172     
  uiTelemetry.ts   |   99.18 |    95.65 |     100 |   99.18 | 119               
 ...learcut-logger |   80.75 |    81.25 |   72.22 |   80.75 |                   
  ...cut-logger.ts |   80.51 |    80.64 |   76.47 |   80.51 | ...02-414,417-419 
  ...tadata-key.ts |    82.6 |      100 |       0 |    82.6 | 143-153           
 src/tools         |   63.73 |    81.01 |   69.85 |   63.73 |                   
  diffOptions.ts   |     100 |      100 |     100 |     100 |                   
  edit.ts          |   77.65 |    82.19 |   84.61 |   77.65 | ...49-450,454-489 
  glob.ts          |   86.79 |       80 |   85.71 |   86.79 | ...89-290,298-305 
  grep.ts          |   56.37 |     75.8 |   72.72 |   56.37 | ...27-532,537-541 
  ls.ts            |    9.28 |      100 |    12.5 |    9.28 | ...85-190,198-308 
  mcp-client.ts    |   75.38 |    77.96 |      30 |   75.38 | ...64-365,384-385 
  mcp-tool.ts      |   91.75 |    85.71 |     100 |   91.75 | ...36,142,147-148 
  memoryTool.ts    |   97.45 |    84.84 |     100 |   97.45 | 94,96,98-99       
  ...iable-tool.ts |     100 |    84.61 |     100 |     100 | 90,97             
  read-file.ts     |   98.36 |    96.15 |     100 |   98.36 | 120-121           
  ...many-files.ts |   80.82 |    71.11 |   83.33 |   80.82 | ...39-440,447-448 
  shell.ts         |    31.8 |      100 |   58.33 |    31.8 | ...53-275,278-492 
  tool-registry.ts |   58.24 |    73.46 |   78.57 |   58.24 | ...99-304,310-311 
  tools.ts         |   76.31 |      100 |      40 |   76.31 | ...44-145,154-159 
  web-fetch.ts     |   30.23 |    72.22 |   66.66 |   30.23 | ...85-186,214-352 
  web-search.ts    |   12.17 |      100 |      20 |   12.17 | ...03-104,107-196 
  write-file.ts    |   81.25 |    82.35 |      80 |   81.25 | ...19-324,386-416 
 src/utils         |   80.28 |    81.01 |   87.03 |   80.28 |                   
  LruCache.ts      |   70.96 |     62.5 |     100 |   70.96 | 20-22,28,30-34    
  bfsFileSearch.ts |   92.45 |    86.66 |     100 |   92.45 | 53-54,67-68       
  editCorrector.ts |   77.35 |    61.11 |   91.66 |   77.35 | ...70-682,716,730 
  editor.ts        |   97.33 |    93.75 |     100 |   97.33 | 134,196,199-200   
  ...rReporting.ts |   83.52 |    84.61 |     100 |   83.52 | 81-85,106-114     
  errors.ts        |   41.46 |       60 |      75 |   41.46 | 17-21,37-52,56-62 
  fetch.ts         |   34.04 |      100 |       0 |   34.04 | 22-27,31-57       
  fileUtils.ts     |   94.69 |    91.54 |     100 |   94.69 | ...45-249,318-324 
  ...eUtilities.ts |   96.03 |       96 |     100 |   96.03 | 28-29,57-58       
  ...rStructure.ts |      95 |    93.42 |     100 |      95 | ...66-167,344-346 
  ...noreParser.ts |   96.36 |     91.3 |     100 |   96.36 | 70-71             
  gitUtils.ts      |   46.34 |    66.66 |      50 |   46.34 | 24-25,40-41,50-73 
  ...yDiscovery.ts |    80.7 |    75.43 |      75 |    80.7 | ...12-313,316-317 
  ...tProcessor.ts |   86.86 |    88.46 |     100 |   86.86 | 115-124,131-140   
  ...Inspectors.ts |     100 |      100 |     100 |     100 |                   
  ...kerChecker.ts |   83.14 |    82.35 |     100 |   83.14 | ...,94-99,107-113 
  paths.ts         |   62.79 |    73.33 |   57.14 |   62.79 | ...23-133,139-140 
  ...rDetection.ts |   48.83 |    44.44 |      80 |   48.83 | ...66,70-71,77-82 
  retry.ts         |   62.55 |    73.21 |     100 |   62.55 | ...54-274,319-334 
  ...aValidator.ts |   86.66 |    73.33 |     100 |   86.66 | 22-23,25-26,43-44 
  session.ts       |     100 |      100 |     100 |     100 |                   
  testUtils.ts     |   84.44 |    72.72 |   83.33 |   84.44 | 27-28,34-35,70-72 
  user_id.ts       |   63.63 |    33.33 |      80 |   63.63 | ...57,74-75,78-79 
-------------------|---------|----------|---------|---------|-------------------

For detailed HTML reports, please see the 'coverage-reports-20.x' artifact from the main CI run.

@gemini-cli gemini-cli Bot added the kind/bug label Jul 9, 2025
@gavin-headen

Copy link
Copy Markdown

Related to this issue as well: #2613

@claell

claell commented Jul 11, 2025

Copy link
Copy Markdown

When will this get released for npm?

Ah, sorry. Was looking at a specific version URL, there, not noticing the updates. So nevermind.

JunYang-tes pushed a commit to JunYang-tes/gemini-cli.nvim that referenced this pull request Jul 12, 2025
involvex pushed a commit to involvex/gemini-cli that referenced this pull request Sep 11, 2025
reconsumeralization pushed a commit to reconsumeralization/gemini-cli that referenced this pull request Sep 19, 2025
@sripasg sripasg added the size/l A large sized PR label Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority/p0 Critical and urgent (e.g., critical security vulnerability, major breakage). size/l A large sized PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GEMINI CLI NOT RECONGIZING GEMINI CODE ASSIST SUBSCRIPTION - RATE LIMITS AND REVERTS BACK TO FLASH 2.5

7 participants